<template>
  <div class="numInfoBox">
    <div class="numInfoBox-title">
      <span class="main-num" v-if="size !== 'small'">
        {{main}}
      </span>
      <span class="main-num_nosplit" v-else>
        {{main}}
      </span>
      <span v-if="size === 'small'">
        /
      </span>
      <span class="assist-num" :class="{'assist-num_nosplit': size === 'small'}">
        {{assist}}
      </span>
    </div>
    <div class="numInfoBox-index">
      {{title}}
    </div>
  </div>
</template>

<script>
  export default {
    name: 'numInfoBox',
    props: ['main', 'assist', 'title', 'size'],
    data () {
      return {}
    }
  }
</script>

<style scoped>
  .numInfoBox {
    width: 100%;
  }

  .numInfoBox-title {
    width: 100%;
    text-align: center;
    color: rgba(155, 160, 153, 1);
  }

  .main-num {
    font-size: 40rpx;
    color: rgba(50, 170, 255, 1);
    position: relative;
  }

  .main-num::after {
    content: " ";
    height: 24rpx;
    width: 1px;
    background: rgba(155, 160, 153, 1);
    position: absolute;
    right: -10rpx;
    top: 20rpx;
  }

  .main-num_nosplit {
    font-size: 40rpx;
    color: rgba(50, 170, 255, 1);
    position: relative;
  }

  .assist-num {
    font-size: 24rpx;
    color: rgba(155, 160, 153, 1);
    margin-left: 20rpx;
  }

  .assist-num_nosplit {
    margin-left: 0;
  }

  .numInfoBox-index {
    margin-top: 14rpx;
    text-align: center;
    width: 100%;
    font-size: 24rpx;
    color: rgba(145, 150, 153, 1);
  }
</style>
